<template>
  <div
    class="newSongs"
    :class="[`dance-music-newsongs-${this.$store.getters.getTheme}`]"
  >
    <div class="content">
      <div class="item" v-for="(item, index) in songlist" :key="index">
        <div class="number">
          <span v-if="!playId">{{ index + 1 }}</span>
          <i v-if="playId" class="iconfont icon-V"></i>
        </div>
        <div class="title">
          <img v-lazy="item.cover" alt="" />
          <div class="icon">
            <i class="iconfont icon-bofang"></i>
          </div>
        </div>
        <div class="mess">
          <div>{{ item.name }}</div>
          <br />
          <div class="bottom">{{ item.artistName }}</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    songlist: {
      type: Array,
      default: []
    }
  },
  data () {
    return {
      playId: null
    }
  }
}
</script>
<style lang="less" scoped>
.dance-music-newsongs {
  &-dark {
    color: #fff;
  }
}
.newSongs {
  width: 100%;
}
.top {
  border-bottom: 1px solid #ccc;
}
.content {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
}
.item {
  padding: 10px 0;
  width: 48%;
  height: 70px;
  display: flex;
  cursor: pointer;
}
.number {
  height: 70px;
  width: 40px;
  text-align: center;
  line-height: 70px;
}
.title {
  position: relative;
  height: 100%;
}
.title img {
  height: 100%;
}
.icon {
  border-radius: 50%;
  width: 18px;
  height: 18px;
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  top: 0;
  margin: auto;
}
.icon img {
  width: 100%;
}
.mess {
  flex: 1;
  margin-left: 10px;
  font-size: 13px;
  position: relative;
}
.mess .bottom {
  position: absolute;
  bottom: 0;
}
</style>
